<?php
	class ShippingMgr
	{
		private $dbc;
		
		 public function __construct($dbc = null)
	     {
	            if (isset($dbc))
	            {
	                $this->dbc = $dbc;
	            }
	     }

// Function for calculating the shipping and handling.
// Takes one argument: the current order total.
// Returns a float.
		public	function getShipping($total = 0) {
				
				// Set the base handling charges:
				$shipping = 0.00;
				
				// Rate is based upon the total:
				if ($total < 500) 
					$shipping=50;
				
				
				// Return the shipping total:
				return $shipping;
				
			} // End of get_shipping() function.
					
	}